package com.yl.service.impl;

import com.yl.mode2.TShopCouponGet2;
import com.yl.model.TShopCouponGet;
import com.yl.dao.TShopCouponGetMapper;
import com.yl.service.TShopCouponGetService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author lfs
 * @since 2021-01-27
 */
@Service
public class TShopCouponGetServiceImpl extends ServiceImpl<TShopCouponGetMapper, TShopCouponGet> implements TShopCouponGetService {

    @Autowired
    TShopCouponGetMapper tShopCouponGetMapper;


    @Override
    public TShopCouponGet findShopCouponGetByOpenId(String openId) {
        return tShopCouponGetMapper.findShopCouponGetByOpenId(openId);
    }

    @Override
    public TShopCouponGet findShopCouponGetByOpenIdAndCouponId(String openId, String couponId) {
        return tShopCouponGetMapper.findShopCouponGetByOpenIdAndCouponId(openId, couponId);
    }

    @Override
    public TShopCouponGet createTShopCouponGet(TShopCouponGet2 tShopCouponGet) {
        TShopCouponGet get = new TShopCouponGet();


        tShopCouponGetMapper.insert(get);
        return get;
    }

    @Override
    public TShopCouponGet createTShopCouponGet(TShopCouponGet tShopCouponGet) {
        tShopCouponGetMapper.insert(tShopCouponGet);
        return tShopCouponGet;
    }
}
